import request from '@/utils/request'

// 版本时间
export const getVTime = () => {
    return request({
        url: "/data-governance/quality/qaRuleDataset/getVersionList",
        method: 'post',
        data: {
            tableName: 'data_qa_rule_dataset'
        }
    });
}

// 数据集保存
export const saveRuleDataset = (params: any) => {
    if (params.id) {
        return request({
            url: '/data-governance/quality/qaRuleDataset/update',
            method: 'post',
            data: params
        });
    } else {
        return request({
            url: '/data-governance/quality/qaRuleDataset/save',
            method: 'post',
            data: params
        });
    }
}


// 数据集删除
export const deleteRuleDataset = (params: any) => {
    return request({
        url: "/data-governance/quality/qaRuleDataset/delete",
        method: 'post',
        data: params
    });
}
// 数据库类型的元数据
export const metaDataList = (params: any) => {
    return request({
        url: "/data-governance/metadata/database-meta-list",
        method: 'get',
        params: params
    });
}